package com.news.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import com.news.entity.News;
import com.news.entity.User;
import com.news.util.PageModel;

public interface UserDao {

	public abstract void setSession(SessionFactory session);

	// login
	public abstract User login(User user);

	// zhuce
	public abstract void addUser(User user);

	// getAllUser
	public abstract List<User> getAllUser();

	public abstract User getUser(int userid);

	// updateuser
	public abstract boolean updateUser(User user);

	// deluser
	public abstract boolean delUser(int userid);

	// 分页查询
	public abstract PageModel getAll(Integer currentPage, Integer rows);

	public abstract Long getAllCount();

	public abstract List<News> allUser(int currPage, int pageSize);

	// 模糊分页查询
	public abstract PageModel checkAll(String name, Integer currentPage,
			Integer rows);

	public abstract Long checkCount();

	public abstract List<News> checkallUser(String name, int currPage,
			int pageSize);

	public abstract List<User> checkusername(String username);

}